package net.towee.client.event.core;

import net.towee.model.account.AccountIdentity;

import com.google.gwt.event.shared.GwtEvent;

public class AccountIdentityUpdatedEvent extends GwtEvent<AccountIdentityUpdateHandler> {
	public static Type<AccountIdentityUpdateHandler> TYPE = new Type<AccountIdentityUpdateHandler>();
	private final AccountIdentity idnt;

	public AccountIdentityUpdatedEvent(AccountIdentity idnt) {
		this.idnt = idnt;
	}
	
	@Override
	protected void dispatch(AccountIdentityUpdateHandler handler) {
		handler.accountIdentityUpdated( idnt );
	}

	@Override
	public Type<AccountIdentityUpdateHandler> getAssociatedType() {
		return TYPE;
	}
}
